﻿using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WPF.TreeView
{
    public partial class MainViewModel : ObservableObject
    {
        [ObservableProperty]
        ObservableCollection<StepViewModel> _myList;
        public MainViewModel()
        {
            MyList = new ObservableCollection<StepViewModel>();
            StepViewModel s1 = new StepViewModel()
            {
                Description = "EntranceStep",
                Depth = 0,
                Icon = "List",
                Children = new ObservableCollection<StepViewModel>(),
            };

            StepViewModel s11 = new StepViewModel()
            {
                Description = "AxisMoveStep",
                Depth = 1,
                Icon = "Gauge",
            };
            s1.Children.Add(s11);

            MyList.Add(s1);
        }
    }
}
